package com.wlc.oop.demo08.interface2;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author 王立朝 wanglichao@champion-credit.com
 * @description ab
 * @date 2021-07-07 15:19
 */
public class AB implements A,B{

    {
        InetAddress host = null;
        try {
            host = InetAddress.getLocalHost();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        String ip =host.getHostAddress();
        System.out.println("本机ip地址：" + ip);
    }

    public static void main(String[] args) {
        AB ab = new AB();
        ab.testA();
        ab.testB();
    }

    @Override
    public void getUserInfo() {
        System.out.println("获取用户信息B");
    }

    @Override
    public void getUser() {
        System.out.println("获取用户A");
    }
}
